<?php

use Encore\Admin\Facades\Admin;
use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;

Admin::routes();

Route::group([
    'prefix' => config('admin.route.prefix'),
    'namespace' => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
    'as' => config('admin.route.prefix') . '.',
], function (Router $router) {

    $router->get('/', 'HomeController@index')->name('home');
    $router->get('device-map', 'HomeController@deviceMap');
    $router->resource('tasks', "\\" . \App\Admin\Controllers\TaskController::class);
    $router->resource('devices', "\\" . \App\Admin\Controllers\DeviceController::class);
    $router->resource('managers', "\\" . \App\Admin\Controllers\ManagerController::class);
    $router->resource('heart-logs', "\\" . \App\Admin\Controllers\HeartLogController::class);
    $router->resource('location-logs', "\\" . \App\Admin\Controllers\LocationLogController::class);
    $router->resource('sms-logs', "\\" . \App\Admin\Controllers\SmsLogController::class);
    $router->resource('visit-logs', "\\" . \App\Admin\Controllers\VisitLogController::class);
    $router->resource('visit-web-tasks', "\\" . \App\Admin\Controllers\VisitWebTaskController::class);
    $router->resource('phone-numbers', "\\" . \App\Admin\Controllers\PhoneNumberController::class);

});
